import request from '@/utils/request';

export function adddictionary(data:any) {
  return request({
      url: `/api/data-dictionary/dictionary`,
      method: 'post',
      data: data
  })
}

export function getdictionarypagelist(data:any) {
  return request({
      url: `/api/data-dictionary/dictionary`,
      method: 'get',
      params: data
  })
}

export function getdictionaryinfo(id:string) {
  return request({
      url: `/api/data-dictionary/dictionary/${id}`,
      method: 'get'
  })
}

export function editdictionaryinfo(id:string, data:any) {
  return request({
      url: `/api/data-dictionary/dictionary/${id}`,
      method: 'put',
      data: data
  })
}

export function deletedictionaryinfo(id:string) {
  return request({
      url: `/api/data-dictionary/dictionary/${id}`,
      method: 'delete'
  })
}




//以下是字典详情的
export function getdictionarydetailpagelist(data:any) {
  return request({
      url: `/api/data-dictionary-detail/dictionary-detail`,
      method: 'get',
      params: data
  })
}



export function adddictionarydetail(data:any) {
  return request({
      url: `/api/data-dictionary-detail/dictionary-detail`,
      method: 'post',
      data: data
  })
}
export function editdictionarydetail(id:string, data:any) {
  return request({
      url: `/api/data-dictionary-detail/dictionary-detail/${id}`,
      method: 'put',
      data: data
  })
}
export function deletedictionarydetail(id:string) {
  return request({
      url: `/api/data-dictionary-detail/dictionary-detail/${id}`,
      method: 'delete'
  })
}

export function getdictionarydetailifo(id:string) {
  return request({
      url: `/api/data-dictionary-detail/dictionary-detail/${id}`,
      method: 'get'
  })
}